/*
 * MainWorkTask.h
 *
 *  Created on: Apr 26, 2017
 *      Author: zhangjf
 */

#ifndef SRC_GLOBAL_MAINWORKTASK_H_
#define SRC_GLOBAL_MAINWORKTASK_H_

#include <Poco/Logger.h>
#include <Poco/Task.h>
#include <Poco/NotificationQueue.h>

using namespace Poco;

namespace global
{

class MainWorkerTask: public Poco::Task
{
public:
	MainWorkerTask();
	virtual ~MainWorkerTask();

	void runTask();

	void enqueueNotification(Notification::Ptr pNotification);

protected:
	Logger& logger() { return _logger; }

private:
	NotificationQueue _nq;
	Logger& _logger;
};

} /* namespace global */

#endif /* SRC_GLOBAL_MAINWORKTASK_H_ */
